package com.learn.thread;

public class ThreadRunable {
    public static void main(String[] args) {
        Thread w1 = new Thread(new WindowRunable());
        Thread w2 = new Thread(new WindowRunable());
        Thread w3 = new Thread(new WindowRunable());

        w1.start();
        w2.start();
        w3.start();
    }
}

class WindowRunable implements Runnable {

    public int num = 100;

    public void run() {
        while (true) {
            if (num > 0) {
                System.out.println(Thread.currentThread().getName() + ":" + num);
            }else {
                break;
            }

            num--;
        }
    }
}
